<template>
    <div class="talk">
        <button @click="get">get</button>
        <ul>
            <li v-for="(item, index) in talkList" :key="item.id">
                <div>{{ item.title }}</div>
            </li>
        </ul>
    </div>
</template>
<script setup lang="ts" name="LoveTalk">
import { useTalkStore } from '@/store/loveTalk';
import { storeToRefs } from 'pinia';

const talkStore = useTalkStore();
const { talkList } = storeToRefs(talkStore);

function get() {
    talkStore.getATalk()
}
</script>
<style scoped>
.talk {
    background-color: orange;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 0 10px;
}
</style>